home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / daemons / ipServer / tcp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-16  |  1.9 KB  |  56 lines

  1. /*
  2.  * tcp.h --
  3.  *
  4.  *    Declarations of external TCP-related routines.
  5.  *
  6.  * Copyright 1987 Regents of the University of California
  7.  * All rights reserved.
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  *
  17.  * $Header: /sprite/src/daemons/ipServer/RCS/tcp.h,v 1.6 89/08/15 19:55:46 rab Exp $ SPRITE (Berkeley)
  18.  */
  19.  
  20. #ifndef _IPS_TCP
  21. #define _IPS_TCP
  22.  
  23. #include "sprite.h"
  24.  
  25. /*
  26.  * TCP_BUF_SIZE is the size for the send and recieve socket buffers for
  27.  * a TCP connection.  This size is used in turn to define
  28.  * TCP_REQUEST_BUF_SIZE which is the size of the pseudo-device request
  29.  * buffer.  This size means that if the client writes more that TCP_BUF_SIZE
  30.  * to the pseudo-device the kernel will block it until the first TCP_BUF_SIZE
  31.  * bytes have been removed from the request buffer.  If the request buffer
  32.  * were larger then large writes would only be partially serviced by TCP,
  33.  * and the extra bytes would just have to be re-written by the kernel.
  34.  */
  35. #define TCP_BUF_SIZE        4096
  36. #define TCP_REQUEST_BUF_SIZE    (TCP_BUF_SIZE)
  37.  
  38. extern void        TCP_Init();
  39. extern ReturnStatus    TCP_SocketOpen();
  40. extern ReturnStatus    TCP_SocketClose();
  41. extern ReturnStatus    TCP_SocketRead();
  42. extern ReturnStatus    TCP_SocketWrite();
  43. extern int        TCP_SocketSelect();
  44. extern ReturnStatus    TCP_SocketBind();
  45. extern ReturnStatus    TCP_SocketConnect();
  46. extern ReturnStatus    TCP_SocketListen();
  47. extern ReturnStatus    TCP_SocketAccept();
  48. extern ReturnStatus    TCP_SocketClone();
  49. extern ReturnStatus    TCP_SocketShutdown();
  50. extern ReturnStatus    TCP_SocketGetOpt();
  51. extern ReturnStatus    TCP_SocketSetOpt();
  52. extern void        TCP_SocketDestroy();
  53. extern void        TCP_PrintInfo();
  54.  
  55. #endif /* _IPS_TCP */
  56.